Skip to content

fix: remove flaky 400 assertion in dropNotifications test - #6

Merged
cesarenaldi merged 1 commit into
mainfrom
claude/kind-wilbur-a06924
Apr 24, 2026
Merged

fix: remove flaky 400 assertion in dropNotifications test#6
cesarenaldi merged 1 commit into
mainfrom
claude/kind-wilbur-a06924

Conversation

@cesarenaldi

@cesarenaldi cesarenaldi commented Apr 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The dropNotifications test expected a 400 when passing a bogus notification ID ('0') with an empty account
  • Investigation of the CLOB repo confirms the DELETE /notifications endpoint always returns 200 OK for non-existent IDs — it uses INSERT INTO fe_notifications_read ... ON CONFLICT DO NOTHING, so unknown IDs silently no-op
  • A 400 is only returned when ids is missing or empty, not when IDs don't exist
  • Fix skips the test when there are no notifications to drop rather than asserting an unreliable API behavior

Test plan

  • Run pnpm test:clientdropNotifications test should no longer flake

Note

Low Risk
Low risk: changes only a client test to avoid asserting an API error status that may legitimately not occur, reducing flakiness without affecting runtime behavior.

Overview
Removes the dropNotifications test assertion that a bogus notification ID returns 400 when the account has no notifications; the test now simply returns early in that situation.

This reduces flakiness by only exercising the happy path where real notification IDs exist and are verified to clear.

Reviewed by Cursor Bugbot for commit e352b0e. Bugbot is set up for automated code reviews on this repo. Configure here.

The DELETE /notifications endpoint always returns 200 OK for non-existent
IDs (uses INSERT...ON CONFLICT DO NOTHING), so expecting a 400 for id '0'
was never a valid assumption. Skip the test when there are no notifications
to drop instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cesarenaldi
cesarenaldi merged commit 075cced into main Apr 24, 2026
5 of 6 checks passed
@cesarenaldi
cesarenaldi deleted the claude/kind-wilbur-a06924 branch April 24, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant